import request from '@/utils/request'

// 查询轮播图管理列表
export function listTradebanner(query) {
  return request({
    url: '/wechat/tradebanner/list',
    method: 'get',
    params: query
  })
}

// 查询轮播图管理详细
export function getTradebanner(tradeBannerId) {
  return request({
    url: '/wechat/tradebanner/' + tradeBannerId,
    method: 'get'
  })
}

// 新增轮播图管理
export function addTradebanner(data) {
  return request({
    url: '/wechat/tradebanner',
    method: 'post',
    data: data
  })
}
export function changeBannerStatus(tradeBannerId, status) {
  const data = {
    tradeBannerId,
    status
  }
  return request({
    url: '/wechat/tradebanner',
    method: 'put',
    data: data
  })
}
// 修改轮播图管理
export function updateTradebanner(data) {
  return request({
    url: '/wechat/tradebanner',
    method: 'put',
    data: data
  })
}

// 删除轮播图管理
export function delTradebanner(tradeBannerId) {
  return request({
    url: '/wechat/tradebanner/' + tradeBannerId,
    method: 'delete'
  })
}

// 导出轮播图管理
export function exportTradebanner(query) {
  return request({
    url: '/wechat/tradebanner/export',
    method: 'get',
    params: query
  })
}